
/**
 * 
 */
package service;

import bean.Cart;
import bean.Order;
import bean.User;
import dao.cartDao;
import dao.orderDao;
import dao.userDao;


public class orderService {
	public boolean payForOrderService(String id,String bid){
		User user = userDao.queryUser(id);
		Cart cart = cartDao.queryProduct(id, bid);
		cartDao.deleteProduct(id, bid);
		return orderDao.addOrder(user, cart);
		
	}
	
	public Order[] displayOrderService(String id) {
		return orderDao.queryorder(id);
	}
}
